<template>
  <!-- 第一遍效果图十大品牌的header，十大品牌出口过于单一所以先留着header，footer -->
  <!-- 第一遍效果图十大品牌的header，十大品牌出口过于单一所以先留着header，footer -->
  <!-- 第一遍效果图十大品牌的header，十大品牌出口过于单一所以先留着header，footer -->
  <div class="header">
    <div class="section">
      <div class="con1">
        <div>
          <img src="../../../../assets/img/common/logo2.png" alt="logo">
        </div>
        <div class="search-container">
          <div class="search-box">
            <div class="serch-left">
              <div @click="brandChose">
                <span>品牌</span>
                <i v-if="choseBool" class="el-icon-arrow-down" />
                <i v-else class="el-icon-arrow-up" />
              </div>
              <input type="search" placeholder="大家都在搜：回力 三叶草 乔丹" max="10">
              <ul v-show="listBool">
                <li>adiss</li>
                <li>nikesss</li>
                <li>lining</li>
                <li>refeng</li>
                <li>xixhaha</li>
              </ul>
            </div>
            <el-button type="primary" icon="el-icon-search" class="search-button">搜索</el-button>
          </div>
          <ul>
            <li>热搜词：</li>
            <li>回力</li>
            <li>三叶草</li>
            <li>乔丹</li>
            <li>匡威</li>
          </ul>
        </div>

        <div v-if="loginBool" class="user login-box">
          <div class="news-box">
            消息
            <span>2</span>
          </div>
          <span>|</span>
          <img src="../../../../assets/img/user/user.png">
          <span>个人中心</span>
          <span>|</span>
          <span>退出</span>
        </div>
        <div v-else class="user user-self">
          <el-button size="small">登录</el-button>
          <el-button type="primary" size="small">注册</el-button>
        </div>
      </div>
      <div class="nav-box">
        <ul class="tab-switch-box">
          <router-link v-for="(item,index) in navList" :key="index" tag="li" :to="{path:theRouter[index]}">{{ item }}</router-link>
        </ul>
        <span>|</span>
        <p>
          <span>服务热线：</span>
          <span>400-622-888</span>
        </p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      loginBool: false,
      activeName: '1',
      /* header */
      choseBool: true,
      listBool: false,
      theRouter: ['/vMain', '/brand', '/vMain/allBrand', '/vMain/join', '/vMain/strength', '/vMain/news', '/vMain/newpersonage'],
      navList: ['首页', '十大品牌', '品牌大全', '招商加盟', '榜上力量', '新闻资讯', '关于我们']
      // navNow: 0
    }
  },
  computed: {

  },
  created() {},
  methods: {
    brandChose() {
      this.listBool = !this.listBool
      this.choseBool = !this.choseBool
    }
  }
}
</script>

<style lang="scss" scoped>
.header{
  height: 143px;
  width: 100%;
  min-width: 1200px;
  background-color: rgba(28,21,9,.87);
  border-bottom: 1px solid rgba(237,222,190,.4);
  >.section{
    width: 1200px;
    margin: 0 auto;
    padding-top: 26px;
    color: #EDDEBE;
    >.con1{
      width: 100%;
      height: 69px;
      -color: #333;
      font-size: 12px;
      /* &::after{
        display:block;clear:both;content:"";visibility:hidden;height:0
      } */
      >div:first-child{
        float: left;
        height: 69px;
        line-height: 69px;
        vertical-align: middle;
        >img{
          margin-right: 28px;
          height: 69px;
        }
      }
      >.search-container{
        float: left;
        height: 69px;
        margin-left: 230px;
        >.search-box{
          width: 533px;
          height: 38px;
          display: flex;
          flex-flow: row nowrap;
          justify-content: flex-start;
          align-items: center;
          margin-bottom: 12px;
          -color: #666;
          >.serch-left{
            height: 38px;
            display: flex;
            flex-flow: row nowrap;
            justify-content: flex-start;
            align-items: center;
            border: 1px solid #EDDEBE;
            position: relative;
            >div:first-child{
              position: relative;
              width: 89px;
              font-size: 14px;
              display: flex;
              flex-flow: row nowrap;
              justify-content: space-between;
              padding: 0 20px;
              cursor: pointer;
              border-right: 1px solid #EDDEBE;
            }
            >input{
              border: none;
              width: 354px;
              padding-left: 20px;
              background-color: transparent;
              color: #EDDEBE;
              padding-right: 18px;
            }
            input::-webkit-input-placeholder {
              /* placeholder颜色  */
              color: #EDDEBE;
              font-size: 12px;
            }
            >ul{
              position: absolute;
              top: 38px;
              left: 0;
              z-index: 99;
              >li{
                text-align: center;
                cursor: pointer;
              }
            }
          }
          >.search-button{
            color: #1C140E;
            background-color: #EDDEBE;
            border: none;
            border-radius: 0;
            border-top-right-radius: 5px;
            border-bottom-right-radius: 5px;
            width: 90px;
          }
        }
        >ul{
          font-size: 12px;
          -color: #EDDEBE;
          padding-left: 20px;
          display: flex;
          flex-flow: row nowrap;
          justify-content: flex-start;
          align-items: center;
          >li{
            margin-right: 8px;
          }
          >li:nth-child(4){
            -color: #417AEF;
          }
          >li:first-child~li{
            cursor: pointer;
          }
        }
      }
      >.user{
        float: right;
        width: 194px;
        height: 28px;
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-between;
        align-items: center;
      }
      >.login-box{
        padding-top: 11px;
        >.news-box{
          position: relative;
          >span{
            display: block;
            width: 14px;
            height: 14px;
            line-height: 13px;
            text-align: center;
            border-radius: 4px;
            background-color: #417AEF;
            color: #EDDEBE;
            position: absolute;
            top: -9px;
            right: -9px;
          }

        }
      }
      .user-self{
        padding-top: 13px;
        font-size: 12px;
        display: flex;
        flex-flow: row nowrap;
        justify-content: flex-end;
        >.el-button{
          background-color: transparent;
          color: #EDDEBE;
          border: 1px solid #EDDEBE;
        }
        >.el-button--primary{
          color: #20190C;
          background-color: #EDDEBE;
        }
      }
    }
    >.nav-box{
      width: 1200px;
      margin: 0 auto;
      display: flex;
      flex-flow: row nowrap;
      justify-content: space-between;
      align-items: center;
      >.tab-switch-box{
        width: 776px;
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-between;
        align-items: center;
        font-size: 16px;
        >li{
          position: relative;
          cursor: pointer;
        }
        >li:hover{
          /*  */
        }
        >.router-link-exact-active{
          color: rgb(250, 239, 215);
          &::after{
            display:block;
            content:"";
            width: 100%;
            height:2px;
            background-color: rgb(250, 239, 215);
            position: absolute;
            bottom: -17px;
            left: 0;
            z-index: 99;
          }
        }
      }
      >span{
        color: #EDDEBE;
      }
      >p{
        height: 46px;
        display: flex;
        flex-flow: row nowrap;
        justify-content: flex-start;
        align-items: center;
        >span{
          line-height: 1;
          display: block;
        }
        >span:first-child{
          font-size: 20px;
          color: #EDDEBE;
        }
        >span:last-child{
          font-size: 30px;
          color: #EDDEBE;
          padding-top: 3px;
        }
      }
    }
  }
}
</style>

